/**
 * 日期范围选择（中文）
 */
var Daterange = function(){

    return {
    	daterangePickers: function (element) {
	        if (!jQuery().daterangepicker) {
	            return;
	        }
	
	        $(element).daterangepicker({
	             opens: (App.isRTL() ? 'left' : 'right'),
	             format: 'yyyy-MM-dd',
	             separator: ' / ',
	             startDate: Date.today().add({
	                 days: -30
	             }),
	             endDate: Date.today(),
	             minDate: '01/01/2014',
	             maxDate: '12/31/2024',
	             locale: {
	             	applyLabel: '确定',
		            fromLabel: '从',
		            toLabel: '到',
		            weekLabel: 'W',
		            customRangeLabel: '自定义范围',
		            daysOfWeek: Date.CultureInfo.shortestDayNames,
		            monthNames: Date.CultureInfo.monthNames,
		            firstDay: 0
	             }
	            }
	        );
	   },
    };
}();
